/**
 * Copyright © 2020 易久批电子商务有限公司. All rights reserved.
 */
package com.dysm.imageprint;

import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author xiay
 * @since 2020/9/18 10:00 上午
 */
public class ImagePrintTest {


    public static void main(String[] args) throws Exception {
//        File f1 = new File("/Users/xiay/Downloads/WechatPhoto.jpg");
        File f2 = new File("/Users/xiay/Downloads/CC.png");
//        File f3 = new File("/Users/xiay/Downloads/WechatIMG2.jpeg");
        List<File> fileList = new ArrayList<File>();
//        fileList.add(f1);
        fileList.add(f2);
//        fileList.add(f3);
        for (File file : fileList) {
            InputStream inputStream = new FileInputStream(file);
            BufferedImage image = ImageIO.read(inputStream);
            BufferedImage bufferedImage = HandleImageSize.resizeImage(image, image.getWidth()/3, image.getHeight()/3);
            Print.printImage(bufferedImage, 0, true, System.out);
        }
    }








}
